package sun.net.www.protocol.x;

import org.springframework.util.StreamUtils;

import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.charset.Charset;

/**
 * x handler test
 * @author xiaodao
 * @version 1.0
 * @date 2021/8/25
 */
public class HandlerTestd {
    public static void main(String[] args) throws IOException {
        //类似 spring中 classpath:
        URL url = new URL("x:///META-INF/default.properties");
        final InputStream inputStream = url.openStream();
        System.out.println(StreamUtils.copyToString(inputStream, Charset.forName("utf-8")));


    }
}
